Digital image data, generated by a digital imaging device, such as a digital camera or digital scanner, is typically stored as a set of pixels, each pixel including a set of color channel color values. For example, each pixel in a RGB formatted data file may include three color values, i.e., a color value for a red color channel, a color value for a green color channel, and a color value for a blue color channel. Each pixel converted from a Bayer space formatted data file may include four color values, i.e., a color value for a red color channel (R), a color value for a first green color channel (G1), a color value for a second green color channel (G2) and a color value for a blue color channel (B).
Each color channel may support a range of valid color values. For example, a color channel that allows 10 bits for the storage of each color value may support color values within the range of 0 to 1023. For example, in an RGB device that allows 10 bits for the storage of each color value, the electrical signal generated as a result of light impacting a pixel light sensor configured to measure an intensity of a red component of the incident light is translated to a digital value between 0 and 1023 and is stored as a red channel color value associated with the pixel. The electrical signal generated as a result of light impacting a pixel light sensor configured to measure an intensity of a blue component of the incident light is translated to a digital value between 0 and 1023 and is stored as a blue channel color value associated with the pixel. The electrical signal generated as a result of light impacting a pixel light sensor configured to measure an intensity of a green component of the incident light is translated to a digital value between 0 and 1023 and is stored as a green channel color value associated with the pixel. Together, the red, blue and green color channel color values define a pixel color that is determined by the magnitude of the respective RGB color channel color values.
Overexposure and near over-exposure is inevitable in digital images of some high contrast scenes. In high contrast scenes, the electrical signal generated as a result of light impacting one or more pixel light sensors translates to a digital value greater that the maximum allowed digital value, e.g., 1023, that can be stored as a channel value for the pixel. Overexposed pixel channel data is typically represented in the image data with the maximum valid channel value, e.g., 1023. Near-overexposed pixel channel data is typically represented in the image data with a valid channel value that is close to the maximum allowed channel value, e.g., 1023.
Further, digital image data may be degraded by one or more types of distortion. The distortions can include, for example, optical crosstalk, and sensor shading. Optical crosstalk, for reasons described in U.S. Non-provisional application Ser. No. 12/481,974, may cause the center of an image to appear brighter and redder than the surrounding portions of the image, which may appear to be darker and bluer. Sensor shading is the result of pixels closer to the center of an image shading pixels further from the center of the image. Although sensor shading is not wavelength dependent, as is optical crosstalk, sensor shading results in a similar form of radially increasing distortion, i.e., radial falloff, by decreasing the amount of light reaching the pixels in the sensor array at locations further from the center of the image.
As described in greater detail below, improper digital image processing performed to remove these one or more types of distortion may cause unexpected color defects at overexposed regions and/or may cause near-overexposed regions to become saturated. In addition, improper white balance processing, i.e., the process of removing unrealistic color casts, so that objects which appear white in person are rendered white in your photo, may also cause unexpected color defects at overexposed regions and/or may cause near-overexposed regions to become saturated.